package ar.edu.unq.edp.futbol.usuarios;

import org.hibernate.Session;
import org.hibernate.Transaction;

import ar.edu.unq.edp.futbol.mains.SharedSessionFactory;

public abstract class UsuarioPersistente<T> extends Usuario{

	public Transaction transaccionar(Session session) {
		return session.beginTransaction();
	}

	public void commitearTransaccion(Transaction transaction) {
		transaction.commit();
	}

	public void rollback(Transaction transaction) {
		transaction.rollback();
	}
	
	public void save(Session session, T object) {
		session.save(object);
	}

}